package com.wx.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wx.mapper.AssortmentMapper;
import com.wx.pojo.Category;
import com.wx.pojo.Sort;
import com.wx.service.AssortmentService;

/**
 * 分类
 *
 */
@Service
public class AssortmentServiceImpl implements AssortmentService{

	@Autowired
	private AssortmentMapper assortmentMapper;

	/**
	 * 查询一级分类
	 */
	@Override
	public List<Sort> findSort() {
		return assortmentMapper.findSort();
	}

	/**
	 * 查询一级和二级分类
	 */
	@Override
	public List<Sort> findAssortment() {
		
		return assortmentMapper.findAssortment();
	}
	/**
	 * 查询全部的二级分类
	 */
	@Override
	public List<Category> findCategory() {
		// TODO Auto-generated method stub
		return assortmentMapper.findCategory();
	}

	/**
	 * 通过Id查询二级目录
	 */
	@Override
	public List<Category> findCategotyBySortId(Integer sortId) {
		
		
		return assortmentMapper.findCategotyBySortId(sortId);
	}
	
	
}
